# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=libsemigroups
pkgver=2.7.3
pkgrel=0
pkgdesc="Library for computing semigroups and monoids"
url="https://github.com/libsemigroups/libsemigroups"
arch="all"
license="GPL-3.0-or-later"
makedepends="eigen-dev fmt-dev"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/libsemigroups/libsemigroups/releases/download/v$pkgver/libsemigroups-$pkgver.tar.gz"

build() {
	export CXXFLAGS="${CXXFLAGS/-Os/-O3}" # gotta go fast

	./configure \
		--target="$CTARGET" \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr \
		--enable-eigen \
		--enable-fmt \
		--with-external-eigen \
		--with-external-fmt
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
001cfdfc55ee9a0bb3fe0914229905083e8eaaec682952bb23b2dc44680631909478bf32e67e93488a7347bfb674305b0cc3b713afa9bce1997a0b1a5693ad36  libsemigroups-2.7.3.tar.gz
"
